#include "Attribute.h"



Attribute::Attribute(QObject* parent) : Item(d20Type_Attribute,parent)
{
}


Attribute::Attribute(const Attribute& other) : Item(other)
{
}



QVariant Attribute::bonus()
{
    if (value().isNull() || !value().canConvert(QVariant::Int))
        return QVariant();


    int ret = (value().toInt()-10)/2;

    return QVariant(ret);
}

